package com.springcloud.test;

import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Desc TODO
 * ----------------
 * @CLASS_NAME: BbController
 * ----------------
 * @Author jovi
 * ----------------
 * @Date 2020-03-27 14:59
 */
@RestController
public class BbController {

    @Resource
    DiscoveryClient discoveryClient;

    @GetMapping("/service-b")
    public String dc() {
        String services = "Service:" + discoveryClient.getServices();
        System.out.println(services);
        return services;
    }
}
